package com.site.war.service.impl;

import java.util.List;
import com.site.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.site.war.mapper.SiteFiveLimitWarningMapper;
import com.site.war.domain.SiteFiveLimitWarning;
import com.site.war.service.ISiteFiveLimitWarningService;

/**
 * 五限位预警Service业务层处理
 *
 * @author site
 * @date 2023-10-13
 */
@Service
public class SiteFiveLimitWarningServiceImpl implements ISiteFiveLimitWarningService
{
    @Autowired
    private SiteFiveLimitWarningMapper siteFiveLimitWarningMapper;

    /**
     * 查询五限位预警
     *
     * @param id 五限位预警主键
     * @return 五限位预警
     */
    @Override
    public SiteFiveLimitWarning selectSiteFiveLimitWarningById(Long id)
    {
        return siteFiveLimitWarningMapper.selectSiteFiveLimitWarningById(id);
    }

    /**
     * 查询五限位预警列表
     *
     * @param siteFiveLimitWarning 五限位预警
     * @return 五限位预警
     */
    @Override
    public List<SiteFiveLimitWarning> selectSiteFiveLimitWarningList(SiteFiveLimitWarning siteFiveLimitWarning)
    {
        return siteFiveLimitWarningMapper.selectSiteFiveLimitWarningList(siteFiveLimitWarning);
    }

    /**
     * 新增五限位预警
     *
     * @param siteFiveLimitWarning 五限位预警
     * @return 结果
     */
    @Override
    public int insertSiteFiveLimitWarning(SiteFiveLimitWarning siteFiveLimitWarning)
    {
        siteFiveLimitWarning.setCreateTime(DateUtils.getNowDate());
        return siteFiveLimitWarningMapper.insertSiteFiveLimitWarning(siteFiveLimitWarning);
    }

    /**
     * 修改五限位预警
     *
     * @param siteFiveLimitWarning 五限位预警
     * @return 结果
     */
    @Override
    public int updateSiteFiveLimitWarning(SiteFiveLimitWarning siteFiveLimitWarning)
    {
        return siteFiveLimitWarningMapper.updateSiteFiveLimitWarning(siteFiveLimitWarning);
    }

    /**
     * 批量删除五限位预警
     *
     * @param ids 需要删除的五限位预警主键
     * @return 结果
     */
    @Override
    public int deleteSiteFiveLimitWarningByIds(Long[] ids)
    {
        return siteFiveLimitWarningMapper.deleteSiteFiveLimitWarningByIds(ids);
    }

    /**
     * 删除五限位预警信息
     *
     * @param id 五限位预警主键
     * @return 结果
     */
    @Override
    public int deleteSiteFiveLimitWarningById(Long id)
    {
        return siteFiveLimitWarningMapper.deleteSiteFiveLimitWarningById(id);
    }
}
